package com.fau.fm.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang.time.DateFormatUtils;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;

/**
 * @desc 产品销售统计临时对象
 * @author dangjh
 * @datetime 2014年11月25日,下午4:34:55
 */
public class MedicalProductStatistics implements Serializable, JSONAware {

	private static final long serialVersionUID = -1428646783361810545L;

	// 发货总数
	private Integer invoiceTotalNumber;
	private BigDecimal invoiceTotal;
	
	// 发货部分
	private Integer invoiceNumber;
	private BigDecimal invoiceMoney;
	
	// 退单部分
	private Integer backNumber;
	private BigDecimal backMoney;
	
	// 签收部分
	private Integer signNumber;
	private BigDecimal signMoney;
	
	// 对账部分
	private Integer reconNumber;
	private BigDecimal reconMoney;
	
	// 回款部分
	private Integer sectionNumber;
	private BigDecimal sectionMoney;
	
	private String hospitalId;
	private Date startTime;
	private Date endTime;
	private String logisticsId;
	private String productNo;
	private String productName;
	private BigDecimal productPrice;
	
	public Integer getInvoiceTotalNumber() {
		return invoiceTotalNumber;
	}

	public void setInvoiceTotalNumber(Integer invoiceTotalNumber) {
		this.invoiceTotalNumber = invoiceTotalNumber;
	}

	public BigDecimal getInvoiceTotal() {
		return invoiceTotal;
	}

	public void setInvoiceTotal(BigDecimal invoiceTotal) {
		this.invoiceTotal = invoiceTotal;
	}

	public Integer getInvoiceNumber() {
		return invoiceNumber;
	}

	public void setInvoiceNumber(Integer invoiceNumber) {
		this.invoiceNumber = invoiceNumber;
	}

	public BigDecimal getInvoiceMoney() {
		return invoiceMoney;
	}

	public void setInvoiceMoney(BigDecimal invoiceMoney) {
		this.invoiceMoney = invoiceMoney;
	}

	public Integer getBackNumber() {
		return backNumber;
	}

	public void setBackNumber(Integer backNumber) {
		this.backNumber = backNumber;
	}

	public BigDecimal getBackMoney() {
		return backMoney;
	}

	public void setBackMoney(BigDecimal backMoney) {
		this.backMoney = backMoney;
	}

	public Integer getSignNumber() {
		return signNumber;
	}

	public void setSignNumber(Integer signNumber) {
		this.signNumber = signNumber;
	}

	public BigDecimal getSignMoney() {
		return signMoney;
	}

	public void setSignMoney(BigDecimal signMoney) {
		this.signMoney = signMoney;
	}

	public Integer getReconNumber() {
		return reconNumber;
	}

	public void setReconNumber(Integer reconNumber) {
		this.reconNumber = reconNumber;
	}

	public BigDecimal getReconMoney() {
		return reconMoney;
	}

	public void setReconMoney(BigDecimal reconMoney) {
		this.reconMoney = reconMoney;
	}

	public Integer getSectionNumber() {
		return sectionNumber;
	}

	public void setSectionNumber(Integer sectionNumber) {
		this.sectionNumber = sectionNumber;
	}

	public BigDecimal getSectionMoney() {
		return sectionMoney;
	}

	public void setSectionMoney(BigDecimal sectionMoney) {
		this.sectionMoney = sectionMoney;
	}

	public String getHospitalId() {
		return hospitalId;
	}

	public void setHospitalId(String hospitalId) {
		this.hospitalId = hospitalId;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getLogisticsId() {
		return logisticsId;
	}

	public void setLogisticsId(String logisticsId) {
		this.logisticsId = logisticsId;
	}

	public String getProductNo() {
		return productNo;
	}

	public void setProductNo(String productNo) {
		this.productNo = productNo;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public BigDecimal getProductPrice() {
		return productPrice;
	}

	public void setProductPrice(BigDecimal productPrice) {
		this.productPrice = productPrice;
	}

	@SuppressWarnings("unchecked")
	@Override
	public String toJSONString() {
		JSONObject obj = new JSONObject();
		obj.put("invoiceTotalNumber", invoiceTotalNumber);
		obj.put("invoiceTotal", invoiceTotal);
		obj.put("invoiceNumber", invoiceNumber);
		obj.put("invoiceMoney", invoiceMoney);
		
		obj.put("backNumber", backNumber);
		obj.put("backMoney", backMoney);
		
		obj.put("signNumber", signNumber);
		obj.put("signMoney", signMoney);
		
		obj.put("reconNumber", reconNumber);
		obj.put("reconMoney", reconMoney);
		
		obj.put("sectionNumber", sectionNumber);
		obj.put("sectionMoney", sectionMoney);
		if(null != startTime && null != endTime) {
			obj.put("startTime", DateFormatUtils.format(startTime, "yyyy-MM-dd HH:mm:ss"));
			obj.put("endTime", DateFormatUtils.format(endTime, "yyyy-MM-dd HH:mm:ss"));
		}
		obj.put("logisticsId", logisticsId);
		obj.put("productNo", productNo);
		obj.put("productName", productName);
		obj.put("productPrice", productPrice);
		return obj.toJSONString();
	}

}
